/**
 * This file is released under the GNU General Public License.
 * Refer to the COPYING file distributed with this package.
 *
 * Copyright (c) 2008-2009 WURFL-Pro srl
 */
package net.sourceforge.wurfl.core;

import java.util.Map;

/**
 * This is interface represent a device connected to the WURFL application.
 * 
 * <p>
 * It enable the user to obtain the capability of the actual device and other
 * useful info. It hides the WURFL repository structure to the other API parts.
 * </p>
 * 
 * @author WURFL-PRO SRL, Rome, Italy
 * @version $Id: Device.java 1045 2009-03-09 15:52:53Z filippo.deluca $
 */
public interface Device {

	/**
	 * Return the WURFL id of this device
	 * 
	 * @return A string representing this device identifier.
	 */
	public String getId();

	/**
	 * Return the user-agent string for this device as defined in WURFL.
	 * 
	 * @return A String containing the defined user-agent.
	 */
	public String getUserAgent();

	/**
	 * Return a device's capability value.
	 * 
	 * @param name
	 *            The identifier of capability to get.
	 * @return The value of capability.
	 * @throws CapabilityNotDefinedException
	 *             If this device do not define the given capability.
	 */
	public String getCapability(String name)
			throws CapabilityNotDefinedException;

	/**
	 * Returns a device's capabilities values by name Map.
	 * 
	 * @return Map<String, String> containing couples name-value of device's
	 *         capabilities.
	 */
	public Map getCapabilities();

	/**
	 * Get the markUp handled by this device.
	 * 
	 * @return A MarkUp instance this device can handle.
	 */
	public MarkUp getMarkUp();

}
